/**
 * TODO
 */
package com.bci.pwtz.service;

import java.util.List;

import com.bci.pwtz.common.util.PaginationList;
import com.bci.pwtz.exception.CanNotDeleteException;
import com.bci.pwtz.exception.PwtzDatabaseException;
import com.bci.pwtz.mysql.model.Dypdx;

/**
 * TODO
 * 
 * @author ICLNetwork Team
 * @version 3.0
 */
public interface DypdxService {
    /**
     * 新增Dypdx
     * TODO
     * @param dypdx
     * @return
     * @throws PwtzDatabaseException
     */
     Dypdx add(Dypdx dypdx) throws PwtzDatabaseException;
    /**
     * 删除（根据bypdxId删除）
     * TODO
     * @param bypdxId
     * @return
     * @throws PwtzDatabaseException
     */
     int delete(String dypdxId)throws PwtzDatabaseException , CanNotDeleteException;
    /**
     * 修改Dypdx
     * TODO
     * @param dypdx
     * @return
     * @throws PwtzDatabaseException
     */
     int update(Dypdx dypdx) throws PwtzDatabaseException;
    /**
     * 查找Dypdx对象（根据bypdxId查找）
     * TODO
     * @param bypdxId
     * @return
     * @throws PwtzDatabaseException
     */
     Dypdx load(String dypdxId) throws PwtzDatabaseException;
    /**
     * 根据时间查询Dypdx
     * TODO
     * @param companyid
     * @param portalType
     * @param beginTime
     * @param endTime
     * @param pageSize
     * @param pageNo
     * @return
     * @throws PwtzDatabaseException
     */
     
     PaginationList<Dypdx> findDypdx(String deviceName,Long companyid,int portalType,String[] medLineCodes,String lineCode,String beginTime,String endTime,int pageSize, int pageNo,String currentDeviceId)throws PwtzDatabaseException;
     
     List<Dypdx> getSamePreDeviceList(String deviceid)throws PwtzDatabaseException;
     
     boolean deleteDevice(String deviceid)throws PwtzDatabaseException,CanNotDeleteException;

     public int updateLastSyncDevice(Long companyId,String lastSyncTime) throws PwtzDatabaseException;
}
